package com.it.xx.domian;

public class Manager {
//【结构设计】
//    管理人员（工号，姓名，性别，手机号）
//    地铁站（地铁站编号，地铁站名称，所属路线）
//            【问题1】
//    请根据业务需求及结构，设计出管理人员类（Manager）和地铁站类(Subway)
//    要求：
//            1.包括所涉及的属性
//2.要生成getter()&setter()方法
//3.要包含无参和带全部参数的构造方法
//4.要有相应的toString()方法，用于输出相关属性的值
    public  Integer aid;
    private  String name;
    private  String gender;
    private  String phone;

    @Override
    public String toString() {
        return "Manager{" +
                "aid=" + aid +
                ", name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", phone=" + phone +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Manager manager = (Manager) o;

        if (aid != null ? !aid.equals(manager.aid) : manager.aid != null) return false;
        if (name != null ? !name.equals(manager.name) : manager.name != null) return false;
        if (gender != null ? !gender.equals(manager.gender) : manager.gender != null) return false;
        return phone != null ? phone.equals(manager.phone) : manager.phone == null;
    }

    @Override
    public int hashCode() {
        int result = aid != null ? aid.hashCode() : 0;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (gender != null ? gender.hashCode() : 0);
        result = 31 * result + (phone != null ? phone.hashCode() : 0);
        return result;
    }

    public Integer getAid() {
        return aid;
    }

    public void setAid(Integer aid) {
        this.aid = aid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String  getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Manager(Integer aid, String name, String gender, String  phone) {
        this.aid = aid;
        this.name = name;
        this.gender = gender;
        this.phone = phone;
    }

    public Manager() {
    }
}
